package homework2;

import java.util.Calendar;
import java.util.Date;

public class Test01 {
    public static void main(String[] args) {
        //获取当前日期
        Calendar instance = Calendar.getInstance();
        calculate(instance);
    }
    public static void calculate(Calendar c){
        //计算500天后几几年几月几日
      c.add(c.DATE,500);
      printDate(c);
    }
    public static void printDate(Calendar c){
        System.out.print((c.get(c.YEAR))+"年"+(c.get(c.MONTH))+"月"+(c.get(c.DATE))+"日");
    }
}
